home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Developer Helper 1: Phil & Dave's Excellent CD
/
Excellent CD HFS.raw
/
Moof
/
Goodies
/
HyperCard Goodies
/
HyperCard Dev. ToolKit
/
Serial & MacinTalk XCMDs
/
GetCreator.p
< prev
next >
Wrap
Text File
|
1987-07-04
|
1KB
|
59 lines
{$R-}
(*
GetCreator -- map OSType to creator name
pascal GetCreator.p
asm GetCreator.a
link -m ENTRYPOINT -o {BOOT}docs -rt XFCN=1 -sn Main=GetCreator ∂
GetCreator.p.o GetCreator.a.o ∂
{MPW}Libraries:Interface.o
{boot}hypercard
*)
{$S GetCreator } { Segment name must be the same as the command name. }
UNIT DummyUnit;
INTERFACE
USES MemTypes, QuickDraw, OSIntf, HyperXCmd;
PROCEDURE EntryPoint(paramPtr: XCmdPtr);
IMPLEMENTATION
TYPE Str31 = String[31];
PROCEDURE GetCreator(paramPtr: XCmdPtr); FORWARD;
FUNCTION ScanDeskTop(creator: OSType; VAR appVol: INTEGER;
VAR appDir: LongInt; VAR appName: Str255): BOOLEAN; EXTERNAL;
PROCEDURE EntryPoint(paramPtr: XCmdPtr);
BEGIN
GetCreator(paramPtr);
END;
PROCEDURE GetCreator(paramPtr: XCmdPtr);
VAR creator: OSType;
appName: Str255;
appVol: INTEGER;
appDir: LongInt;
{$I XCmdGlue.inc }
BEGIN
WITH paramPtr^ DO
BEGIN
IF paramCount < 1 THEN EXIT(GetCreator);
BlockMove(params[1]^,@creator,4);
IF ScanDeskTop(creator,appVol,appDir,appName)
THEN returnValue := PasToZero(appName);
END;
END;
END.